/******************************************************************************/
package jamie.org.sil.www.usxUtils;


/******************************************************************************/
/**
 * A base class for elements of a parsed text string.  This is intended for use
 * only by the ParsedText processing classes.
 * 
 * To save having to cast things to specific types as far as possible, I cheat
 * here, and define some methods which are applicable only to specific
 * subclasses, which the subclasses will then need to override.
 *
 * @author ARA "Jamie" Jamieson
**/

abstract public class ParsedTextElement
{
  /****************************************************************************/
  /* All. */
  
  public String getValue () { return m_Val; }
  public void setValue (String val) { m_Val = val; }
  @Override public String toString () { return getValue(); }
  public String toString (BibleReferenceSupport.Length fullOrAbbreviated,
                          BibleReferenceSupport.Language englishOrVernacular,
                          int sepType,
                          boolean includeDefaultedValues)
  {
    return m_Val;
  }
  
  
  /****************************************************************************/
  /* Numbers only. */
  
  public String getSubverse () { return ""; }
  public void setSubverse (String val) {}

  
  
  /****************************************************************************/
  /* References only. */
  
  public int getNextSeparatorCode () { return -1; }
  public int getPreviousSeparatorCode () { return -1; }
  public void setPreviousSeparatorCode (int subtype) {}
  public void setNextSeparatorCode (int subtype) {}

  

  
  
  /****************************************************************************/
  /* Separators only. */
  
  public int getSeparatorCode () { return -1; }
  public void setSeparatorCode (int subtype) {}

  
  
  /****************************************************************************/
  protected String m_Val = "";
}
